﻿<%@ Page Title="Log In" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Login.aspx.cs" Inherits="Web.CrmContacto.Account.Login" %>

<%@ Import Namespace="Web.Framework.Translate" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
    <script src="/Scripts/App/Login.js" type="text/javascript"></script>
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        <asp:Literal ID="Literal2" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["HeadLoginStatusText"]%>' />
    </h2>
    <p>
        <asp:Literal ID="Literal3" runat="server" Text='<%$ Code:  LocalizationProvider.Instance["IngreseUsuarioYPassword"]%>' />       
    </p>
    <asp:HiddenField ID="hidCompany" ClientIDMode="Static" runat="server" />

    <asp:Login ID="LoginUser" runat="server" EnableViewState="false" 
        RenderOuterTable="false" 
        FailureText='<%$ Code: LocalizationProvider.Instance["Login.UserPassError"] %>' >
        <LayoutTemplate>
            <span class="failureNotification">
                <asp:Literal ID="FailureText" runat="server"></asp:Literal>
            </span>
            <asp:ValidationSummary ID="LoginUserValidationSummary" runat="server" CssClass="failureNotification" 
                 ValidationGroup="LoginUserValidationGroup"/>
            <div class="accountInfo">
                <fieldset class="login">
                    <legend><asp:Literal ID="Literal1" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Login.Informacion"]%>' /> </legend>
                    <p>
                        <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName"><asp:Literal ID="Literal4" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Login.Usuario"]%>' />:</asp:Label>
                        <asp:TextBox ID="UserName" runat="server" CssClass="textEntry"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="UserNameRequired" runat="server" ControlToValidate="UserName" 
                             CssClass="failureNotification" ErrorMessage='<%$ Code: LocalizationProvider.Instance["Login.UserValidation"] %>' ToolTip='<%$ Code: LocalizationProvider.Instance["Login.UserValidation"] %>' 
                             ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
                    </p>
                    <p>
                        <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password"><asp:Literal ID="Literal5" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Login.Password"]%>' />:</asp:Label>
                        <asp:TextBox ID="Password" runat="server" CssClass="passwordEntry" TextMode="Password"></asp:TextBox>
                        <asp:RequiredFieldValidator ID="PasswordRequired" runat="server" ControlToValidate="Password" 
                             CssClass="failureNotification" ErrorMessage='<%$ Code: LocalizationProvider.Instance["Login.PasswordValidation"] %>' ToolTip='<%$ Code: LocalizationProvider.Instance["Login.PasswordValidation"] %>' 
                             ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
                    </p>
                     <p>
                        <asp:Label ID="CompanyLabel" runat="server" AssociatedControlID="CompanyCbo"><asp:Literal ID="Literal6" runat="server" Text='<%$ Code: LocalizationProvider.Instance["Login.Marca"]%>' />:</asp:Label>
                        <asp:DropDownList ID="CompanyCbo" runat="server" CssClass="textEntry" ClientIDMode="Static" Width="320px" onchange="companyChange();" ViewStateMode="Enabled" >                       
                        </asp:DropDownList>
                        <asp:RequiredFieldValidator ID="CompanyRequired" runat="server" ControlToValidate="CompanyCbo" 
                             CssClass="failureNotification" ErrorMessage='<%$ Code: LocalizationProvider.Instance["Login.MarcaValidation"] %>' ToolTip='<%$ Code: LocalizationProvider.Instance["Login.MarcaValidation"] %>' 
                             ValidationGroup="LoginUserValidationGroup">*</asp:RequiredFieldValidator>
                    </p>
                   <%-- <p>
                        <asp:CheckBox ID="RememberMe" runat="server"/>
                        <asp:Label ID="RememberMeLabel" runat="server" AssociatedControlID="RememberMe" CssClass="inline">Keep me logged in</asp:Label>
                    </p>--%>
                </fieldset>
                <p class="submitButton">
                    <asp:Button ID="LoginButton" runat="server" CommandName="Login" Text='<%$ Code: LocalizationProvider.Instance["Login.CmdLogin"] %>' ValidationGroup="LoginUserValidationGroup"/>
                </p>
            </div>
        </LayoutTemplate>
    </asp:Login>

     <script type='text/javascript'>

//        $(document).ready(function () {

//                $("form:first").submit(function () {                
//                         
//                 });

//        };
    </script>

</asp:Content>
